<include file="../Public/header.html" />
<link href="__PUBLIC__/Css/user.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/Js/user/common.js" charset="UTF-8"></script>
<script>
    //鼠标移动表格效果
    $(document).ready(function(){
    	inittable();
    });
    
    function inittable(){
        $("#record_item_list").find('tr').hover(
          function () {
            $(this).addClass("bg_hover");
          },
          function () {
            $(this).removeClass("bg_hover");
          }
        );
    }
    function goPage(pno){
 		$.kajax({      
			url:"{:U('User://Account/ajxCredit')}",      
			type:'post', //数据发送方式  
			data:{pno:pno,stype:$('#ajx_show_area_detail').find('#stype').val()} ,    
			async: false ,//同步方式     
			success: function(html){ 
				$('#ajx_show_area_detail').html(html);
			}
		});
 	}
    
    function ajxGetCredit(stype){
    	k_changeGroupStyle('right_box',' #top_nav > ul > li',stype,'top_baron');
    	$('#ajx_show_area_detail').find('#stype').val(stype);
    	goPage(1);
    }
</script>

<div id="mainWrapper">

	<div id="main">
	 	<include file="../User/Tpl/default/Public/user_left_nav_box.html" />
	    
	    <div id="right_box">
			<div class="item_top" id='top_nav'>
				<span style="float:right;font-weight:bold">
					剩余：&nbsp;
					<font style="color:red;font-size:16px;font-style: italic;">{$totalGain}</font>
					&nbsp;积分
					<!-- &nbsp;&nbsp;&nbsp;&nbsp;
					已使用：&nbsp;
					<font style="color:red;font-size:16px;font-style: italic;">{$totalUsed}</font>
					&nbsp;积分-->&nbsp;&nbsp;
				</span>
				<ul>
					<li class="top_bar top-bar-wide top_baron" rel='gain' onclick="ajxGetCredit('gain');">获得的积分</li>
				</ul>
				<ul>
					<li class="top_bar top-bar-wide" rel='used' onclick="ajxGetCredit('used');">使用的积分</li>
				</ul>
				<ul>
					<li class="top_bar top-bar-wide" rel='role'>积分规则</li>
				</ul>
			</div>
			
			<div style="margin-top:15px" id='ajx_show_area_detail'>
				<include file="../User/Tpl/default/Account/credit_list_box.html" />
			</div>
		</div>
	  	<!-- 右侧内容 end  -->
	  	<div class="c"></div>
	</div>
</div>

<include file="../Public/footer.html" />